package com.ljs.mongodemo.demo.bean;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import lombok.Data;

import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.List;

@Document(collection="user")
@Data
@ToString
public class User implements Serializable {
    // MongoDB文档编号，主键
    @Id
    private String id;

    // 在MongoDB中使用user_name保存属性
    @Field("user_name")
    private String userName;
    @Field("user_note")
    private String note ;
   @Field("user_type")
  private String type;
    @Field("create_time")
    private String createTime ;


}
